<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/finance/djlc/cw_djlc_assess.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/finance/djlc/cw_djlc_assess.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'cw_djlc_assess_id',
                footer: "Foots",
                cnName: '采购物料估价表',
                name: 'djlc/cw_djlc_assess',
                url: "/cw_djlc_assess/",
                sortName: "CreateDate"
            });
            const editFormFields = ref({"materialnum":"","MTyp":"","description":"","pricesource":"","price":""});
            const editFormOptions = ref([[{"title":"物料号","field":"materialnum","type":"text"},
                               {"title":"MTyp","field":"MTyp","type":"text"}],
                              [{"title":"物料描述","field":"description","type":"textarea"},
                               {"title":"价格来源","field":"pricesource","type":"text"}],
                              [{"title":"价格","field":"price","type":"text"}]]);
            const searchFormFields = ref({"materialnum":"","description":""});
            const searchFormOptions = ref([[{"title":"物料号","field":"materialnum","type":"like"},{"title":"物料描述","field":"description","type":"like"}]]);
            const columns = ref([{field:'cw_djlc_assess_id',title:'估价表id',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'materialnum',title:'物料号',type:'string',width:220,align:'left',sort:true},
                       {field:'MTyp',title:'MTyp',type:'string',width:220,align:'left'},
                       {field:'description',title:'物料描述',type:'string',width:220,align:'left'},
                       {field:'pricesource',title:'价格来源',type:'string',width:220,align:'left'},
                       {field:'price',title:'价格',type:'decimal',width:110,align:'left'},
                       {field:'Creator',title:'创建人',type:'string',width:100,align:'left'},
                       {field:'CreateDate',title:'创建日期',type:'datetime',width:150,align:'left',sort:true},
                       {field:'Modifier',title:'修改人',type:'string',width:100,align:'left'},
                       {field:'ModifyDate',title:'修改日期',type:'datetime',width:150,align:'left',sort:true}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
